package
{
	import config.UrlConfig;
	
	import controller.Application;
	
	import flash.display.Sprite;
	import flash.display.StageAlign;
	import flash.display.StageScaleMode;
	import flash.events.Event;
	
	[SWF(width="900",height="580",frameRate="30",backgroundColor="#FFFFFF")]
	public class WheelMain extends Sprite
	{
		public function WheelMain()
		{
			if (stage)
				init();
			else
				addEventListener(Event.ADDED_TO_STAGE, init);
		}
		

		private function init(e:Event = null):void
		{
			removeEventListener(Event.ADDED_TO_STAGE, init);
			
			initload();
			
			stage.align = StageAlign.TOP;
			stage.scaleMode = StageScaleMode.NO_SCALE;
			
			// 参数初始化
			if (loaderInfo.parameters['HTTPROOT'] != null){
				UrlConfig.HTTPROOT = loaderInfo.parameters['HTTPROOT'];
			}
			
			Application.getInstance().init(this);
		}
		
		private function initload():void
		{
			soundAlert;
			soundClick;
			soundBet;
			soundDin;
			soundWin;
			sondLost;
		}
	}
}